package it.poste.il.compensatore.service;

import it.poste.il.compensatore.entities.Message;

import java.util.List;

/**
 * Interface of MessageService.
 */
public interface MessageService {
	/**
	 * Select the id operation of message.
	 * @param msg The message.
	 * @return int The id operation of message.
	 */
	public int selectOperationId(Message msg);

	/**
	 * Select the id status of message.
	 * @param msg The message.
	 * @return int The id status of message.
	 */
	public int selectStatusId(Message msg);

	/**
	 * The list of all messages by a type.
	 * @param type The type of message.
	 * @return List The list of Messages.
	 */
	public List<Message> loadListByType(int type);

	/**
	 * Method that retrieve the message by id.
	 * @param id Id to identify the message.
	 * @return Message The entity Message.
	 */
	public Message retrieveByID(Long id);

	/**
	 * The list of all messages.
	 * @return List The list of Messages.
	 */
	public List<Message> retrieveAll();

	/**
	 * Method that save the message.
	 * @param message Message to save.
	 * @return Message The Message saved.
	 */
	public Message save(Message message);

	/**
	 * Update the message.
	 * @param message Message to update.
	 * @return void
	 */
	public void update(Message message);

	/**
	 * Delete the message.
	 * @param message Message to delete.
	 * @return void
	 */
	public void delete(Message message);
}
